-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add user creation examples #391
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor comment. Otherwise looks good.
|
||
def check_for_account_by_username(username: str) -> bool: | ||
url = f"{BASE_URL}/api/users" | ||
query_string = urlencode(dict(q=f"username:{username}", page=1, size=1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
query_string = urlencode(dict(q=f"username:{username}", page=1, size=1)) | |
query_string = urlencode(dict(q=f"username:{username}", page=1, page_size=1)) |
|
||
def check_for_account_by_email(email: str) -> bool: | ||
url = f"{BASE_URL}/api/users" | ||
query_string = urlencode(dict(q=f"email:{email}", page=1, size=1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
query_string = urlencode(dict(q=f"email:{email}", page=1, size=1)) | |
query_string = urlencode(dict(q=f"email:{email}", page=1, page_size=1)) |
Example for how to automate creating users in Saturn Cloud